var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.getMapId() == 800000000) {
                cm.askMenu_Bottom("要送什么？\r\n#L0#前往#m100000000##l\r\n#L1#前往#m130000000##k#l", 56, 0)
            } else {
                cm.sendNormalTalk_Bottom("前往#m800000000#。", 37, 9111063, false, true)
            }
        } else {
            if (status === a++) {
                if (cm.getMapId() == 800000000) {
                    switch (b) {
                        case 0:
                            cm.warp(100000000, 0);
                            break;
                        case 1:
                            cm.warp(130000000, 0);
                            break
                    }
                } else {
                    cm.warp(800000000, 5, false)
                }
                cm.dispose()
            }
        }
    }
};